package com.zys.service.impl;

import com.zys.domain.User;
import com.zys.mapper.UserMapper;
import com.zys.service.UserService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 77052
 * @description 针对表【user】的数据库操作Service实现
 * @createDate 2024-12-12 23:31:33
 */
@Service
@RequiredArgsConstructor
public class UserServiceImpl implements UserService {

    private final UserMapper userMapper;


    @Override
    public User getUserById(Integer id) {
        return userMapper.getUserById(id);
    }

    @Override
    public void addUser(User user) {
        userMapper.addUser(user);
    }

    @Override
    public User findUserByName(String name) {
         return userMapper.findUserByName(name);
    }

    @Override
    public List<User> selectUserByCondition(User user) {
        return  userMapper.selectUserByCondition(user);
    }

}




